# 两个 FROM：使用一个包含编译工具的镜像来编译代码，然后使用一个更小的运行时镜像来运行编译后的程序。
FROM python:3.10-alpine AS build
RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.ustc.edu.cn/g' /etc/apk/repositories && \
apk update && \
apk add git gcc musl-dev libffi-dev openssl-dev make

FROM python:3.10-alpine
# COPY --from=build /install/lib /usr/local/lib
# COPY --from=build /install/src /usr/local/src
WORKDIR /app
COPY ./app.py /app/app.py
CMD ["python", "app.py"]
